1. Field of the Invention
The present invention relates to a method for compressing image data with pseudo gradation using dither pattern, a method for expanding the image data, and a compressing device.
2. Description of the Prior Art
A print system including a computer, a printer and the like is used commonly. Concerning this print system, there is a method of performing image processing such as a pseudo gradation process of image data to be printed at the computer side and printing the image on paper at the printer without performing any specific process on the image data transmitted from the computer.
Conventionally, a raster printer is known as the printer that is used for this method. The raster printer does not perform any special image processing at the printer side, so it can be realized at low cost using a small scale of hardware. However, it transmits image data that can be printed on paper without any conversion to the printer, so it has a drawback that quantity of data to be transmitted is apt to be large. In addition, if the image data contains character data, resolution should be increased for printing characters clearly. As a result, quantity of data to be transmitted to the printer is further increased. Accordingly, it takes much time to transmit image data from the computer to the printer.
In order to solve this problem, image data should be compressed at the computer side. However, if the compression process is complicated, the compression process itself may require much time. Moreover, expansion process at the printer side also takes much time, and hardware for the process becomes large and expensive.
Therefore, in order to enable to use an inexpensive printer and realize a print system that is capable of processing at high speed as a whole, a novel compression technique is desired that can perform compression with a small process load, perform expansion with a small scale of hardware and realize a high compressibility.
Furthermore, in order to print multi-gradation image data by a printer, the image data should be processed with a pseudo gradation process in many cases. As a method of the pseudo gradation process, a dithering method is known conventionally. The dithering method utilizes a dither pattern and compares each threshold value of the dither pattern with each pixel value of the image data to generate binary data.
As a compression technique using a dither pattern, there is a method disclosed in Japanese unexamined patent publication No. 6-152986. According to the method shown in this document, the binary image data are divided into blocks by a predetermined size. A reference pattern corresponding to the number of dots contained in a certain image block is compared with the image block. If the image block matches the reference pattern, a code indicating the reference pattern is assigned. Otherwise, a result of the comparison is encoded.
In addition, as a compression technique for binary image data, there is known a JBIG format that is approved to be adopted by ITU (International telecommunications union)-T recommendation.
In addition, a method for compressing image data processed with pseudo gradation process using a dither pattern is disclosed in U.S. Pat. No. 6,201,614. According to the method described in this document, a pixel value of each pixel is compared with a threshold value so that a range is determined for each pixel.
However, the above-mentioned method of the first document has a drawback. Since the reference pattern is encoded if a designated image block matches the reference pattern, quantity of data to be transmitted is increased by quantity of the code of the reference pattern.
In contrast, the JBIG format requires a relatively light load and can perform the compression process fast even on a computer. However, the JBIG format has lower compressibility than other format such as LZS format or LZW format. In particular, its compressibility decreases if half tone data increases.
Furthermore, the above-mentioned method of the second document determines a value of each pixel, so quantity of information is not decreased by it only. Therefore, another compression means are necessary for decreasing quantity of information.